﻿using Abp.Domain.Entities.Auditing;
using MyCompanyName.AbpZeroTemplate.Authorization.Users;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCompanyName.AbpZeroTemplate.Prm.Project
{

    /// <summary>
    /// 文档分享记录
    /// </summary>
    public class ProjectDocmeutShare : FullAuditedEntity<int>
    {
        //项目Id
        public virtual int ProjectId { get; set; }

        /// <summary>
        /// 等于0是项目附件 or 项目文档
        /// </summary>
        public virtual int DocTypeId { get; set; }

        [ForeignKey("ProjectDocId")]
        public virtual ProjectDocmeut Doc { get; set; }


        /// <summary>
        /// 文档Id
        /// </summary>
        public virtual int ProjectDocId { get; set; }

        /// <summary>
        /// 截至时间
        /// </summary>
        public virtual DateTime EndDate { get; set; }

        public virtual string  Remark { get; set; }

    }


    /// <summary>
    /// 分享到的人员
    /// </summary>
    public class ProjectDocmeutShareMember : FullAuditedEntity<int>
    {
        public int ProjectShareDocId { get; set; }

        [ForeignKey("ProjectShareDocId")]
        public virtual ProjectDocmeutShare DocShare { get; set; }

        public long UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual User User { get; set; }
    }
}
